function setCookie(c_name,value,expiredays)
{
    var exdate=new Date()
    exdate.setDate(exdate.getDate()+expiredays)
    document.cookie=c_name+ "=" +escape(value)+
        ((expiredays==null) ? "" : ";expires="+exdate.toGMTString())+";path=/";
}


function clearCookie(name) {
    setCookie(name, "", -1);
}



//传输总价，跳转到支付页面；
function chuanshu1() {
    var zongjia=document.getElementById("price1").value;


    clearCookie('order_id');
    setCookie('order_id',order_id1,1);
    var count=zongjia*(1+gettex1());

    window.open('../../支付页面/main/main/test1.html?'+count);
    toOrder1();
}
function chuanshu2() {
    var zongjia=document.getElementById("price2").value;
    clearCookie('order_id');
    setCookie('order_id',order_id2,1);
    var count=zongjia*(1+gettex2());
    window.open('../../支付页面/main/main/test1.html?'+count);
    toOrder2();
}
function chuanshu3() {
    var zongjia=document.getElementById("price3").value;
    clearCookie('order_id');
    setCookie('order_id',order_id3,1);
    var count=zongjia*(1+gettex3());

    window.open('../../支付页面/main/main/test1.html?'+count);
    toOrder3();
}
function chuanshu4() {
    var zongjia=document.getElementById("price4").value;

    var count=zongjia*(1+gettex4());
    clearCookie('order_id');
    setCookie('order_id',order_id4,1);
    window.open('../../支付页面/main/main/test1.html?'+count);
    toOrder4();
}
function chuanshu5() {
    var zongjia=document.getElementById("price5").value;
    clearCookie('order_id');
    setCookie('order_id',order_id5,1);
    var count=zongjia*(1+gettex5());

    window.open('../../支付页面/main/main/test1.html?'+count);
    toOrder5();
}
function chuanshu6() {
    var zongjia=document.getElementById("price6").value;
    clearCookie('order_id');
    setCookie('order_id',order_id6,1);
    var count=zongjia*(1+gettex6());

    window.open('../../支付页面/main/main/test1.html?'+count);
    toOrder6();
}

function gettex1() {
    var doc=document.getElementsByName("Bid1");
    for(i=0;i<doc.length;i++){
        if(doc[i].checked){
            if(doc[i].value=="17%"){
                return 0.17;
            }else if(doc[i].value=="无税率"){
                return 0;
            }
        }
    }
}
function gettex2() {
    var doc=document.getElementsByName("Bid2");
    for(i=0;i<doc.length;i++){
        if(doc[i].checked){
            if(doc[i].value=="17%"){
                return 0.17;
            }else if(doc[i].value=="无税率"){
                return 0;
            }
        }
    }
}
function gettex3() {
    var doc=document.getElementsByName("Bid3");
    for(i=0;i<doc.length;i++){
        if(doc[i].checked){
            if(doc[i].value=="17%"){
                return 0.17;
            }else if(doc[i].value=="无税率"){
                return 0;
            }
        }
    }
}
function gettex4() {
    var doc=document.getElementsByName("Bid4");
    for(i=0;i<doc.length;i++){
        if(doc[i].checked){
            if(doc[i].value=="17%"){
                return 0.17;
            }else if(doc[i].value=="无税率"){
                return 0;
            }
        }
    }
}
function gettex5() {
    var doc=document.getElementsByName("Bid5");
    for(i=0;i<doc.length;i++){
        if(doc[i].checked){
            if(doc[i].value=="17%"){
                return 0.17;
            }else if(doc[i].value=="无税率"){
                return 0;
            }
        }
    }
}
function gettex6() {
    var doc=document.getElementsByName("Bid6");
    for(i=0;i<doc.length;i++){
        if(doc[i].checked){
            if(doc[i].value=="17%"){
                return 0.17;
            }else if(doc[i].value=="无税率"){
                return 0;
            }
        }
    }
}

function toOrder1() {
    var OC1=Order_code1;
    window.open('http://47.104.10.151/a/GongYeHuaPingTaiQianDuan/消息通知界面（用户）/main/index.html?'+OC1);
}

function toOrder2() {
    var OC2=Order_code2;
    window.open('http://47.104.10.151/a/GongYeHuaPingTaiQianDuan/消息通知界面（用户）/main/index.html?'+OC2);
}

function toOrder3() {
    var OC3=Order_code3;
    window.open('http://47.104.10.151/a/GongYeHuaPingTaiQianDuan/消息通知界面（用户）/main/index.html?'+OC3);
}

function toOrder4() {
    var OC4=Order_code4;
    window.open('http://47.104.10.151/a/GongYeHuaPingTaiQianDuan/消息通知界面（用户）/main/index.html?'+OC4);
}

function toOrder5() {
    var OC5=Order_code5;
    window.open('http://47.104.10.151/a/GongYeHuaPingTaiQianDuan/消息通知界面（用户）/main/index.html?'+OC5);
}

function toOrder6() {
    var OC6=Order_code6;
    window.open('http://47.104.10.151/a/GongYeHuaPingTaiQianDuan/消息通知界面（用户）/main/index.html?'+OC6);
}


